import java.util.Scanner;

public class Answer1 {
    //删除公共字符
    //https://www.nowcoder.com/practice/f0db4c36573d459cae44ac90b90c6212?tpId=182&tqId=34789&ru=/exam/oj
    // hash 表统计
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s=in.nextLine();
        String t=in.nextLine();
        boolean[] hash=new boolean[128];
        for(char ch : t.toCharArray()){
            hash[ch]=true;
        }

        for(char ch: s.toCharArray()){
            if(!hash[ch]){
                System.out.print(ch);
            }
        }
    }
}
